package com.zhulanhua.blogs.Utils;


public class StringUtils {

    public static boolean isEmpty(String s){
        if ("".equals(s) || s == null){
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(String s){
        return !isEmpty(s);
    }

    public static String join(String[] strArray, String p){
        StringBuilder str = new StringBuilder();
        for (int i = 0;i < strArray.length;i++){
            str.append(strArray[i]).append(p);
            if (i == strArray.length - 2){
                break;
            }
        }
        str.append(strArray[strArray.length - 1]);
        return str.toString();
    }
    public static String join(String[] strArray){
        return join(strArray, ",");
    }
}
